home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFUNCS / FRMNLDIA.C < prev    next >
C/C++ Source or Header  |  1993-02-01  |  1KB  |  44 lines

  1. /**************************************************************************
  2.  * FRMNLDIA.C - frm_nldialog(): Newline-delimted dialog.
  3.  *                This is a lot like frm_dsdialog() -- it dynamically
  4.  *                constructs a dialog box around some boilerplate text you
  5.  *                specify, and conducts the user interaction.  For this
  6.  *                function, the text is all one huge string, with lines
  7.  *                delimited by NL chars.
  8.  *************************************************************************/
  9.  
  10. #include "gemfintl.h"
  11.  
  12. /**************************************************************************
  13.  *
  14.  *************************************************************************/
  15.  
  16. short frm_nldialog(options, buttons, strings)
  17.     long             options;
  18.     register char    *buttons;
  19.     register char    *strings;
  20. {
  21.     short            status;
  22.     char            *strptrs[FRM_DSMAXSTRINGS+1];
  23.     char            *strpatches[FRM_DSMAXSTRINGS+1];
  24.     char            *btnptrs[FRM_DSMAXBUTTONS+1];
  25.     char            *btnpatches[FRM_DSMAXBUTTONS+1];
  26.  
  27.     if (buttons == NULL || *buttons == '\0') {
  28.         buttons = " Continue ";
  29.     }
  30.     if (strings == NULL || *strings == '\0') {
  31.         strings = "<no message>";
  32.     }
  33.  
  34.     _FrmNL2DS(buttons, btnptrs, btnpatches, FRM_DSMAXBUTTONS);
  35.     _FrmNL2DS(strings, strptrs, strpatches, FRM_DSMAXSTRINGS);
  36.  
  37.     status = frm_dsdialog(options, btnptrs, strptrs);
  38.  
  39.     _FrmNLPatch(strpatches);
  40.     _FrmNLPatch(btnpatches);
  41.  
  42.     return status;
  43. }
  44.